﻿@{
    ViewBag.Title = "ChangePassword";
	Layout = null;
}

<h2>修改密码</h2>
<link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
	function Check() {
		var old = $("#oldPassword").attr("value");
		var nep = $("#newPassword").attr("value");
		var conf = $("#confirmPassword").attr("value");
		if (old =="") {
			alert("输入原密码");
			return false;
		}
		else if (nep =="") {
			alert("新密码不能为空");
			return false;
		}
		else if (nep != conf) {
			alert("两次输入的密码不一致！");
			return false;
		}
		else {
			return true;
		}
	}
	var message="@TempData["Message"]";
	if(message)
	{
		alert(message);
	}
</script>
@using (Html.BeginForm("ChangePassword","SysManage",FormMethod.Post))
{
<div id="con">
	<p>
		<span><label for="oldPassword">原 密 码：</label></span>
		<input type="password" value="" name="oldPassword" id="oldPassword"/>
	</p>
	<p>
		<span><label for="newPassword">新 密 码：</label></span>
		<input type="password" value="" name="newPassword" id="newPassword"/>
	</p>
	<p>
		<span><label for="confirmPassword">确认密码：</label></span>
		<input type="password" value="" name="confirmPassword" id="confirmPassword"/>
	</p>
	<p>
		<input type="submit" value="确定修改" onclick="return Check();" />       
		<input type="reset" value="取消修改" />
	</p>
</div>
}